package com.linkhub.oms.admin.modules.wms.domain.param;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "DeliveryListConfirmParam", description = "DeliveryListConfirmParam")
public class DeliveryListConfirmParam implements Serializable {
    private Request request;

    @Data
    public static class Request {
        private DeliveryOrder deliveryOrder;
        private Packages packages;
        private OrderLines orderLines;
        private OrderDetails orderDetails;
    }

    @Data
    public static class DeliveryOrder {
        private String deliveryOrderCode;
        private String deliveryOrderId;
        private String warehouseCode;
        private String ownerCode;
        private String orderType;
        private String status;
        private String outBizCode;
        private String confirmType;
        private String logisticsCode;
        private String expressCode;
        private String documentMaker;
        private String shipper;
        private String receiverName;
        private String deliveryTime;
        private String userDefined1;
        private String userDefined2;
        private String userDefined3;
        private String userDefined4;
        private String customer;
        private String serialNos;
        private String serialNoQty;
        private String sourcePlatformCode;
        private String remark;
        private String rtexpressCode;
    }

    @Data
    public static class Packages {
        @JsonProperty("package")
        private List<Package> packageList;
    }

    @Data
    public static class Package {
        private String logisticsCode;
        private String expressCode;
        private String packageCode;
        private Items items;
        private String weight;
        private String volume;
        private String consumableVolume;
        private String consumableCode;
        private String productVolume;
        private String productWeight;
        private String userDefined1;
        private String userDefined2;
        private String userDefined3;
        private String userDefined4;
        private ConsumableDetails consumableDetails;
    }

    @Data
    public static class ConsumableDetails {
        private List<ConsumableDetail> consumableDetail;
    }

    @Data
    public static class ConsumableDetail {
        private String consumableCode;
        private String quantity;
    }

    @Data
    public static class Items {
        private List<Item> item;
    }

    @Data
    public static class Item {
        private String itemCode;
        private String quantity;
    }

    @Data
    public static class OrderLines {
        private List<OrderLine> orderLine;
    }

    @Data
    public static class OrderLine {
        private String lineNo;
        private String itemCode;
        private String packUom;
        private String planQty;
        private String actualQty;
        private String actualPackUomQty;
        private String inventoryType;
        private String serialNo;
        private Batchs batchs;
        private String customField1;
        private String customField2;
        private String customField3;
        private String customField4;
        private String customField5;
        private String customField6;
        private String customField7;
        private String customField8;
    }

    @Data
    public static class Batchs {
        private List<Batch> batch;
    }

    @Data
    public static class Batch {
        private String actualQty;
        private String actualPackUomQty;
        private String inventoryType;
        private String virtualWarehouse;
        private String productDate;
        private String expireDate;
        private String batchCode;
        private String stockinDate;
        private String userDefined1;
        private String userDefined2;
        private String userDefined3;
        private String userDefined4;
        private String lpn;
    }

    @Data
    public static class OrderDetails {
        private List<Detail> detail;
    }

    @Data
    public static class Detail {
        private String boxNo;
        private String epc;
    }
}
